Skip to main content

VAModalPicker

A common component to display a picker for the device with an optional label

NameTypeDefault ValueRequiredDescription
selectedValuestringYesCurrently selected item from list of options
onSelectionChange(selectValue: string) => voidYesCalled when the selected value is changed
onClose() => voidNoCalled when the cancel button is pressed
pickerOptionsPickerItem[]Yeslist of items of containing types label and value for each option in the picker
labelKeystringNoi18n key for the text label next the picker field
disabledbooleanNooptional boolean that disables the picker when set to true
isRequiredFieldbooleanNooptional boolean that displays required text next to label if set to true
helperTextKeystringNooptional key for string to display underneath label
setError(error?: string) => voidNooptional callback to update the error message if there is an error
errorstringNoif this exists updated picker styles to error state
includeBlankPlaceholderbooleanNoIf true, will include a blank option at the top of the list with a blank value
displayButtonbooleanfalseNorenders a button instead of form field
buttonTextstringNoi18n key text for the name of the button
confirmBtnTextstringNoi18n key text for the picker confirm button
showModalByDefaultbooleanNoshows the modal by default
testIDstringNoOptional TestID for scrollView
cancelTestIDstringNoOptional TestID for cancel button
confirmTestIDstringNoOption TestID for apply button